Finds sidebar nodes that have attributes defined in<span class="argument">attr</span> and returns them or an empty array.

<div class="definition">
    find([parent], attrs)
</div>

<div class="arguments">
    <table>
    <tr>
        <td>parent</td>
        <td><b>string</b>, id of the parent node (<i>optional</i>)</td>
    </tr>
    <tr>
        <td>attrs</td>
        <td><b>object</b>, attributes to match</td>
    </tr>
    </table>
</div>

Returns array.

<h4>Description</h4>

The <span class="argument">attrs</span> argument needs to be specified. It can be an empty object - {} - which will return you an
array of all nodes.
<div style="height: 10px"></div>

You can optionally specify <span class="argument">parent</span>, which is an id of the parent node. If parent is specified
then it will limit the search scope to that parent and its subnodes.
<div style="height: 10px"></div>

If you defined the object in the following way:
<textarea class="javascript">
let sidebar = new w2sidebar({
    name : 'sidebar',
    nodes: [
        { id: 'id-1', text: 'Level 1', disabled: true },
        { id: 'id-2', text: 'Level 2' },
        { id: 'id-3', text: 'Level 3' }
    ]
});
</textarea>

To get all disabled nodes:
<textarea class="javascript">
var nodes = w2ui.sidebar.find({ disabled: true });
console.log(nodes);
</textarea>

To get all nodes:
<textarea class="javascript">
var all = w2ui.sidebar.find({});
console.log(all);
</textarea>